package com.wang.home.find;

import com.wang.home.HomeReq;
import com.wang.tool.dagre.DagreContext;
import com.wang.tool.dagre.node.DagreNode;

import java.util.Collection;

/**
 * @Description
 * @Author shaopeng
 * @Date 2021/9/28
 * @Version 1.0
 */
public class LocationFinder implements DagreNode<HomeReq> {

    @Override
    public Collection<String> getDependIds() {
        return FindWorkerEnum.LOCATION.getDependCodes();
    }

    @Override
    public Object preCheck(DagreContext<HomeReq> context) {
        return null;
    }

    @Override
    public boolean isSync() {
        return true;
    }

    @Override
    public String getId() {
        return FindWorkerEnum.LOCATION.name();
    }

    @Override
    public Object execute(DagreContext<HomeReq> context1) throws Exception {
        HomeReq param = context1.getParam();
        Thread.sleep(2);
        param.setLng("csdcds");
        return "12.30,30.69";
    }
}
